Skip to content

feat(remote-config): add getAll() method#977

Merged
robingenz merged 1 commit into
mainfrom
feat/issue-976
May 14, 2026
Merged

feat(remote-config): add getAll() method#977
robingenz merged 1 commit into
mainfrom
feat/issue-976

Conversation

@robingenz
Copy link
Copy Markdown
Member

Summary

  • Adds getAll() to the @capacitor-firebase/remote-config plugin, returning every Remote Config key/value pair as strings, with source (Static / Default / Remote) on Android and iOS.
  • Web uses Firebase JS SDK getAll(); Android uses FirebaseRemoteConfig.getAll(); iOS unions keys from .default and .remote sources and reads each via configValue(forKey:).

Test plan

  • Web: call FirebaseRemoteConfig.getAll() after fetchAndActivate() and confirm every fetched key is present.
  • Android: call FirebaseRemoteConfig.getAll() after fetchAndActivate() and confirm values + source are correct.
  • iOS: call FirebaseRemoteConfig.getAll() after fetchAndActivate() and confirm values + source are correct, including default keys.

Closes #976

Copilot AI review requested due to automatic review settings May 13, 2026 21:57
@robingenz robingenz self-assigned this May 13, 2026
@robingenz robingenz changed the title feat(remote-config): add getAll method feat(remote-config): add getAll() method May 13, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a getAll() API to the Remote Config plugin so consumers can retrieve all configured key/value pairs across Web, Android, and iOS.

Changes:

  • Adds getAll() to TypeScript plugin definitions and Web implementation.
  • Implements native getAll() bridge methods for Android and iOS.
  • Updates README API docs and adds a changeset for the minor release.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/remote-config/src/web.ts Adds Web getAll() using Firebase JS SDK values.
packages/remote-config/src/definitions.ts Adds public API and result types for getAll().
packages/remote-config/README.md Documents the new method and result interfaces.
packages/remote-config/ios/Plugin/FirebaseRemoteConfigPlugin.swift Registers and resolves the iOS bridge method.
packages/remote-config/ios/Plugin/FirebaseRemoteConfig.swift Collects iOS remote/default keys and values.
packages/remote-config/android/src/main/java/io/capawesome/capacitorjs/plugins/firebase/remoteconfig/FirebaseRemoteConfigPlugin.java Adds Android bridge serialization for all values.
packages/remote-config/android/src/main/java/io/capawesome/capacitorjs/plugins/firebase/remoteconfig/FirebaseRemoteConfig.java Exposes Android Firebase Remote Config getAll().
.changeset/remote-config-get-all.md Adds a minor release changeset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 13, 2026

Open in StackBlitz

@capacitor-firebase/analytics

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/analytics@977

@capacitor-firebase/app

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/app@977

@capacitor-firebase/app-check

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/app-check@977

@capacitor-firebase/authentication

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/authentication@977

@capacitor-firebase/crashlytics

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/crashlytics@977

@capacitor-firebase/firestore

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/firestore@977

@capacitor-firebase/functions

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/functions@977

@capacitor-firebase/messaging

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/messaging@977

@capacitor-firebase/performance

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/performance@977

@capacitor-firebase/remote-config

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/remote-config@977

@capacitor-firebase/storage

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/storage@977

commit: e5ce36b

@jacobg
Copy link
Copy Markdown
Contributor

jacobg commented May 14, 2026

@robingenz Looks great, thanks! Should the web implementation include source?

public async getAll(): Promise<GetAllResult> {
    const remoteConfig = getRemoteConfig();
    const all = getAll(remoteConfig);
    const values: Record<string, GetAllResultValue> = {};
    for (const key of Object.keys(all)) {
      values[key] = { value: all[key].asString(), source: all[key].getSource() };
    }
    return { values };
  }

@robingenz
Copy link
Copy Markdown
Member Author

Good catch — I considered this in the original plan but kept it out to match the existing getBoolean/getNumber/getString web behavior (which also don't expose source despite the SDK supporting it). To keep this PR focused on the original feature request, I've opened #978 to track adding source on web across all four getters consistently. Thanks for the suggestion!

@robingenz robingenz merged commit 1289c74 into main May 14, 2026
7 checks passed
@robingenz robingenz deleted the feat/issue-976 branch May 14, 2026 15:33
@jacobg
Copy link
Copy Markdown
Contributor

jacobg commented May 14, 2026

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Add getAll method to remote-config plugin

3 participants